﻿using System;
using System.Drawing;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
using System.IO;
using System.Web.Security;
using webapp4U;
using webapp4U.BOL;

namespace webapp4U.UI
{
    [ParseChildren(true)]
    public class ddlJobLocation : DropDownList
    {
        public ddlJobLocation()
        {
            int CountryID;
            if (Globals.LangVietNam())
                CountryID = 1;
            else
                CountryID = 2;
            List<JobLocation> obj = JobLocation.GetJobLocationByCountryID(CountryID);
            this.DataSource = obj;
            this.DataValueField = "JobLocationID";
            this.DataTextField = (Globals.LangVietNam()) ? "JobLocationName" : "JobLocationName_en";
            this.DataBind();
            this.Items.Insert(0, new ListItem(ResourceManager.GetString("PleaseSelect"), ""));

        }
    }
}
